package cn.gailvlun.gll.presentation.chat.adapter;

import android.content.Context;

import com.github.markzhai.recyclerview.SingleTypeAdapter;

import java.util.List;

import cn.gailvlun.gll.R;
import cn.gailvlun.gll.bean.SelectHolder;
import cn.gailvlun.gll.net.apartment.room.Task;



public class ReviewCheckInTagAdapter extends SingleTypeAdapter<SelectHolder<Task>> {
    public ReviewCheckInTagAdapter(Context context) {
        super(context, R.layout.item_review_check_in_tag);
    }

    public List<SelectHolder<Task>> getData() {
        return mCollection;
    }

    public Task getCurrentTask() {
        for (SelectHolder<Task> selectHolder :
                mCollection) {
            if (selectHolder.getSelected()) {
                return selectHolder.getData();
            }
        }
        return null;
    }
}
